# Contributor: knuxify <knuxify@gmail.com>
# Maintainer: knuxify <knuxify@gmail.com>
pkgname=pinta
pkgver=2.0.2
pkgrel=1
pkgdesc="Simple GTK# paint program"
url="https://www.pinta-project.com/"
arch="x86_64 aarch64 armv7" # other arches blocked by dotnet6
license="MIT"
depends="dotnet6-runtime gtk+3.0"
makedepends="dotnet6-sdk gettext-dev gtk+3.0-dev intltool"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://github.com/PintaProject/Pinta/releases/download/$pkgver/pinta-$pkgver.tar.gz"

prepare() {
	default_prepare
	# Packaging fails without this
	sed -i '/^PINTA_BUILD_OPTS/ s/$/ -maxcpucount:1/' Makefile.in
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
2853ad40f897b92aeb72bbf02ae59e5c7813ba49debea73510d50c06ecee44669615573ed195d9a9d9c8a3f26203ef751c43c9ba255e311fa87783674f3c1c5f  pinta-2.0.2.tar.gz
"
